using System;
using System.Data;
using System.Configuration;
using System.ComponentModel;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;


namespace Data.DataSources {
	public class PurchaseBatch_StatusHistoryDataSource : ObjectDataSourceBase {
		public override bool UseNoLock { get { return false; } }
		public override string SelectViewName { get { return "StatusHistory_PurchaseBatch(@ID)"; } }
		public override string InsertViewName { get { throw new NotImplementedException(); } }
		public int BatchID {
			set { SetSelectParameter("BatchID", value); }
		}
		public PurchaseBatch_StatusHistoryDataSource(int BatchID) : this(){
			this.BatchID = BatchID;
		}
		public PurchaseBatch_StatusHistoryDataSource() {
			OrderBy.Add("ID DESC");
		}
		public override DataView SelectEx(int BatchID) {
			return Select("", BatchID);
		}
		public string ShowToolTip(int BatchID) {
			GridView gv = new GridView();
			gv.RowStyle.CssClass = "NoWrap";
			System.IO.StringWriter stringWrite = new System.IO.StringWriter();
			System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);
			gv.DataSource = SelectEx(BatchID);
			gv.DataBind();
			gv.RenderControl(htmlWrite);
			return stringWrite.ToString();
		}
	}
}